export default class Vector2{
  x:number = 0
  y:number = 0
  constructor(x:number = 0,y:number = 0){
    this.x = x
    this.y = y
  }
  compare(v:Vector2):boolean{
    return Math.floor(this.x) === Math.floor(v.x) && Math.floor(this.y) === Math.floor(v.y)
  }
  offset(x:number,y:number):Vector2{
    return new Vector2(this.x + x,this.y+y)
  }
}